Feature: Create and modify tasks

Scenario: Defining tasks
* tasks have a unique id
* tasks have a title
* tasks have a creation date and time
* tasks have a creator id
* tasks have a closed by id
* tasks have a completion date
* tasks have a list of comments
* tasks have a status
* tasks have an owner
* tasks have a project id

Scenario: Defining status
* a status has an id
* a status has an updated date
* a status has a description label
* a status can be either closed or no-closed

Scenario: Creating a new task
Given a user is identified
When the user enters the task title
And submits the task
Then the task is saved
And the title matches the one defined by the user
And the date is set as now
And the creator id is the user id
And the completion date is not set
And the list of comments is empty
And the status is INITIAL
And the status is no-closed
And the owner is the creator himself
And the closed by id is not set

Scenario: Closing a task
Given an existing no-closed task
And the user is identified
And the user is the task owner or the team leader
When the user updates the task with a closing status
Then the new task status is the one set by the user
And the status date is updated
And the task completion date is now
And the closed by id is the current user id

Scenario: Reopening a task
Given an existing closed task
And the user is identified
And the user is the task owner or the team leader
When the task is reopened
Then the task status is REOPENED
And the status date is updated
And the closed by id is not set
